home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / iconal1a / searchfo.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-10-04  |  3.7 KB  |  130 lines

  1. VERSION 4.00
  2. Begin VB.Form SearchForm 
  3.    Caption         =   "Search Icons"
  4.    ClientHeight    =   3570
  5.    ClientLeft      =   1140
  6.    ClientTop       =   1515
  7.    ClientWidth     =   4755
  8.    Height          =   3975
  9.    Icon            =   "SearchForm.frx":0000
  10.    Left            =   1080
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   238
  15.    ScaleMode       =   3  'Pixel
  16.    ScaleWidth      =   317
  17.    Top             =   1170
  18.    Width           =   4875
  19.    Begin VB.CommandButton Command1 
  20.       Caption         =   "COPY"
  21.       Height          =   420
  22.       Left            =   3645
  23.       TabIndex        =   3
  24.       Top             =   1125
  25.       Width           =   870
  26.    End
  27.    Begin VB.FileListBox File1 
  28.       BackColor       =   &H00C0FFC0&
  29.       ForeColor       =   &H00008000&
  30.       Height          =   2985
  31.       Left            =   1845
  32.       Pattern         =   "*.ico"
  33.       TabIndex        =   2
  34.       Top             =   495
  35.       Width           =   1500
  36.    End
  37.    Begin VB.DirListBox Dir1 
  38.       BackColor       =   &H00C0FFC0&
  39.       ForeColor       =   &H00008000&
  40.       Height          =   2505
  41.       Left            =   135
  42.       TabIndex        =   1
  43.       Top             =   990
  44.       Width           =   1545
  45.    End
  46.    Begin VB.DriveListBox Drive1 
  47.       BackColor       =   &H00C0FFC0&
  48.       ForeColor       =   &H00008000&
  49.       Height          =   315
  50.       Left            =   135
  51.       TabIndex        =   0
  52.       Top             =   495
  53.       Width           =   1545
  54.    End
  55.    Begin VB.Label Label1 
  56.       BackColor       =   &H00C0FFC0&
  57.       BorderStyle     =   1  'Fixed Single
  58.       Caption         =   "Label1"
  59.       ForeColor       =   &H000000FF&
  60.       Height          =   285
  61.       Left            =   135
  62.       TabIndex        =   4
  63.       Top             =   45
  64.       Width           =   4470
  65.    End
  66.    Begin VB.Image Image1 
  67.       Height          =   480
  68.       Left            =   3825
  69.       Top             =   540
  70.       Width           =   480
  71.    End
  72. Attribute VB_Name = "SearchForm"
  73. Attribute VB_Creatable = False
  74. Attribute VB_Exposed = False
  75. Private Sub Command1_Click() 'copy to temp
  76. On Error GoTo mkdir0
  77. MkDir IBpath$ & "\" & "_tempicons"
  78. IconBook.Dir1.Refresh
  79. mkdir0:
  80. FileCopy Label1.Caption, IBpath & "\" & "_tempicons" & "\" & File1.List(File1.ListIndex)
  81. Command1.Enabled = False
  82. IconBook.File1.Refresh
  83. End Sub
  84. Private Sub Dir1_Change()
  85. File1.Path = Dir1.Path
  86. Label1.Caption = Dir1.Path
  87. CopyEnabled
  88. End Sub
  89. Private Sub Dir1_Click()
  90. File1.Path = Dir1.List(Dir1.ListIndex)
  91. Label1.Caption = Dir1.List(Dir1.ListIndex)
  92. CopyEnabled
  93. End Sub
  94. Private Sub Drive1_Change()
  95. Dir1.Path = Drive1.Drive
  96. Label1.Caption = Drive1.Drive
  97. CopyEnabled
  98. End Sub
  99. Private Sub File1_Click()
  100. If Right(File1.Path, 1) = "\" Then
  101. Image1.Picture = LoadPicture(File1.Path + File1.List(File1.ListIndex))
  102. Label1.Caption = File1.Path + File1.List(File1.ListIndex)
  103. Image1.Picture = LoadPicture(File1.Path + "\" + File1.List(File1.ListIndex))
  104. Label1.Caption = File1.Path + "\" + File1.List(File1.ListIndex)
  105. End If
  106. CopyEnabled
  107. End Sub
  108. Private Sub Form_Activate()
  109. Command1.Enabled = False
  110. End Sub
  111. Private Sub Form_Load()
  112. SearchForm.Move (Screen.Width - SearchForm.Width) / 2, (Screen.Height - SearchForm.Height) / 2
  113. Drive1.Drive = "c:"
  114. Dir1.Path = "c:\"
  115. File1.Path = "c:\"
  116. Label1.Caption = ""
  117. End Sub
  118. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  119. Cancel = True
  120. SearchForm.Hide
  121. IconBook.Show
  122. End Sub
  123. Private Sub CopyEnabled()
  124. If File1.ListIndex = -1 Then
  125. Command1.Enabled = False
  126. Image1.Picture = LoadPicture("")
  127. Command1.Enabled = True
  128. End If
  129. End Sub
  130.